<template v-if="page == 'library-recentlyadded'">
    <div class="content-inner">
        <div class="row">
            <div class="col" style="padding:0;">
                <h1 class="header-text">{{$root.getLz('term.recentlyAdded')}}</h1>
            </div>
            <div class="col-auto">
                <button v-if="library.albums.downloadState == 2" @click="getLibraryAlbumsFull(true, 0)"
                        class="reload-btn"><%- include('../svg/redo.svg') %></button>
            </div>
        </div>
        <div class="row">
            <div class="col" style="padding:0;">
                <div class="search-input-container" style="width:100%;margin: 16px 0;">
                    <div class="search-input--icon"></div>
                    <input type="search"
                           style="width:100%;"
                           spellcheck="false"
                           :placeholder="$root.getLz('term.search') + '...'"
                           @input="searchLibraryAlbums"
                           v-model="library.albums.search" class="search-input">
                </div>
            </div>
            <div class="col-auto flex-center">
                <div class="row">
                    <div class="col">
                        <select class="md-select" v-model="library.albums.sortOrder[0]"
                                @change="searchLibraryAlbums(0)">
                            <optgroup :label="$root.getLz('term.sortOrder')">
                                <option value="asc">{{$root.getLz('term.sortOrder.ascending')}}</option>
                                <option value="desc">{{$root.getLz('term.sortOrder.descending')}}</option>
                            </optgroup>
                        </select>
                    </div>
                    <div class="col">
                        <select class="md-select" v-model="library.albums.viewAs">
                            <optgroup :label="$root.getLz('term.viewAs')">
                                <option value="covers">{{$root.getLz('term.viewAs.coverArt')}}</option>
                                <option value="list">{{$root.getLz('term.viewAs.list')}}</option>
                            </optgroup>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="well">
            <mediaitem-square v-if="library.albums.viewAs == 'covers'" :item="item"
                              v-for="item in library.albums.displayListing">
            </mediaitem-square>
            <mediaitem-list-item v-if="library.albums.viewAs == 'list'" :show-duration="false" :show-meta-data="true"
                                 :show-library-status="false" :item="item"
                                 v-for="item in library.albums.displayListing">
            </mediaitem-list-item>
        </div>
    </div>
</template>